package com.galaxy.provider.order.controller.api;

import com.galaxy.provider.order.api.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户外部接口控制类
 *
 * @author caijb
 * @version 1.0.0
 * @date 2018-10-19 14:05
 */
@RestController
public class UserFeignApiController {

    @Autowired
    private UserFeignClient userFeignClient;

    @GetMapping("/getUser/{id}")
    public String sayHi(@RequestParam(defaultValue = "id", required = true) String id) {
        return userFeignClient.getUser(id);
    }
}
